#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: batch_start.py 
@version:
@time: 2022/04/26 
"""
from TapUtil.TLinux.Tlinux import UseLinux

docker_list = [
    'bb343867a874' # gaussDB 183
]


def test_start():
    T = UseLinux()
    cmd_start = ''
    cmd_stop = ''
    cmd_ps = ''
    for docker_id in docker_list:
        if docker_id:
            cmd_start = f'docker start {docker_id}'
            cmd_stop = f'docker stop {docker_id}'
            cmd_ps = f'docker ps -a|grep {docker_id}'
        T.ssh_cmd(cmd_start)


def test_stop():
    T = UseLinux()
    cmd_start = ''
    cmd_stop = ''
    cmd_ps = ''
    for docker_id in docker_list:
        if docker_id:
            cmd_start = f'docker start {docker_id}'
            cmd_stop = f'docker stop {docker_id}'
            cmd_ps = f'docker ps -a|grep {docker_id}'
        T.ssh_cmd(cmd_stop)
